package com.itheima.mapper1;

import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wuyiqiang
 * @2022/6/18 17:19
 */
@Mapper
public interface SetmealClientMapper {

    /**
     * 根据categoryId查询套餐信息
     *
     * @param categoryId
     * @param status
     * @return
     */
    @Select("select * from setmeal where category_id=#{categoryId} and status=#{status}")
    List<Setmeal> selectById(String categoryId, Integer status);

    /**
     * 根据id查询套餐信息
     * @param id
     * @return
     */
    @Select("select * from setmeal where id=#{id} ")
    Setmeal select(String id);
}
